package com.example.appmanager.ui.gallery;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

import com.example.appmanager.Appconfig.Appconfig;
import com.example.appmanager.MainActivity;
import com.example.appmanager.entity.UserTableEntity;
import com.example.appmanager.services.AllresposeService;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class GalleryViewModel extends ViewModel {
    /*这里进行网路请求进行赋值给前端*/
    private MutableLiveData<UserTableEntity> mText;
    private UserTableEntity userEntity = new UserTableEntity();
    private Context context;
    private String uAccount;

    public void setData(Context context,UserTableEntity userEntity,String uAccount) {
        this.context = context;
        this.userEntity = userEntity;
        this.uAccount = uAccount;
    }
    public GalleryViewModel( UserTableEntity userEntity, Context context) {
        this.userEntity = userEntity;
        this.context = context;
    }

    public GalleryViewModel() {
        mText = new MutableLiveData<>();
        mText.setValue(userEntity);

    }


    public LiveData<UserTableEntity> getText() {
        return mText;
    }
}